Optimal. Leaf size=164 \[ -\frac {7 c^4 \tanh ^{-1}(\sin (e+f x))}{a^3 f}+\frac {7 c^4 \tan (e+f x)}{a^3 f}+\frac {2 c (c-c \sec (e+f x))^3 \tan (e+f x)}{5 f (a+a \sec (e+f x))^3}-\frac {14 \left (c^2-c^2 \sec (e+f x)\right )^2 \tan (e+f x)}{15 a f (a+a \sec (e+f x))^2}+\frac {14 \left (c^4-c^4 \sec (e+f x)\right ) \tan (e+f x)}{3 f \left (a^3+a^3 \sec (e+f x)\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.19, antiderivative size = 164, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 5, integrand size = 32, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.156, Rules used = {4042, 3872,
3855, 3852, 8} \begin {gather*} \frac {7 c^4 \tan (e+f x)}{a^3 f}-\frac {7 c^4 \tanh ^{-1}(\sin (e+f x))}{a^3 f}+\frac {14 \tan (e+f x) \left (c^4-c^4 \sec (e+f x)\right )}{3 f \left (a^3 \sec (e+f x)+a^3\right )}-\frac {14 \tan (e+f x) \left (c^2-c^2 \sec (e+f x)\right )^2}{15 a f (a \sec (e+f x)+a)^2}+\frac {2 c \tan (e+f x) (c-c \sec (e+f x))^3}{5 f (a \sec (e+f x)+a)^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3852
Rule 3855
Rule 3872
Rule 4042
Rubi steps
\begin {align*} \int \frac {\sec (e+f x) (c-c \sec (e+f x))^4}{(a+a \sec (e+f x))^3} \, dx &=\frac {2 c (c-c \sec (e+f x))^3 \tan (e+f x)}{5 f (a+a \sec (e+f x))^3}-\frac {(7 c) \int \frac {\sec (e+f x) (c-c \sec (e+f x))^3}{(a+a \sec (e+f x))^2} \, dx}{5 a}\\ &=\frac {2 c (c-c \sec (e+f x))^3 \tan (e+f x)}{5 f (a+a \sec (e+f x))^3}-\frac {14 \left (c^2-c^2 \sec (e+f x)\right )^2 \tan (e+f x)}{15 a f (a+a \sec (e+f x))^2}+\frac {\left (7 c^2\right ) \int \frac {\sec (e+f x) (c-c \sec (e+f x))^2}{a+a \sec (e+f x)} \, dx}{3 a^2}\\ &=\frac {2 c (c-c \sec (e+f x))^3 \tan (e+f x)}{5 f (a+a \sec (e+f x))^3}-\frac {14 \left (c^2-c^2 \sec (e+f x)\right )^2 \tan (e+f x)}{15 a f (a+a \sec (e+f x))^2}+\frac {14 \left (c^4-c^4 \sec (e+f x)\right ) \tan (e+f x)}{3 f \left (a^3+a^3 \sec (e+f x)\right )}-\frac {\left (7 c^3\right ) \int \sec (e+f x) (c-c \sec (e+f x)) \, dx}{a^3}\\ &=\frac {2 c (c-c \sec (e+f x))^3 \tan (e+f x)}{5 f (a+a \sec (e+f x))^3}-\frac {14 \left (c^2-c^2 \sec (e+f x)\right )^2 \tan (e+f x)}{15 a f (a+a \sec (e+f x))^2}+\frac {14 \left (c^4-c^4 \sec (e+f x)\right ) \tan (e+f x)}{3 f \left (a^3+a^3 \sec (e+f x)\right )}-\frac {\left (7 c^4\right ) \int \sec (e+f x) \, dx}{a^3}+\frac {\left (7 c^4\right ) \int \sec ^2(e+f x) \, dx}{a^3}\\ &=-\frac {7 c^4 \tanh ^{-1}(\sin (e+f x))}{a^3 f}+\frac {2 c (c-c \sec (e+f x))^3 \tan (e+f x)}{5 f (a+a \sec (e+f x))^3}-\frac {14 \left (c^2-c^2 \sec (e+f x)\right )^2 \tan (e+f x)}{15 a f (a+a \sec (e+f x))^2}+\frac {14 \left (c^4-c^4 \sec (e+f x)\right ) \tan (e+f x)}{3 f \left (a^3+a^3 \sec (e+f x)\right )}-\frac {\left (7 c^4\right ) \text {Subst}(\int 1 \, dx,x,-\tan (e+f x))}{a^3 f}\\ &=-\frac {7 c^4 \tanh ^{-1}(\sin (e+f x))}{a^3 f}+\frac {7 c^4 \tan (e+f x)}{a^3 f}+\frac {2 c (c-c \sec (e+f x))^3 \tan (e+f x)}{5 f (a+a \sec (e+f x))^3}-\frac {14 \left (c^2-c^2 \sec (e+f x)\right )^2 \tan (e+f x)}{15 a f (a+a \sec (e+f x))^2}+\frac {14 \left (c^4-c^4 \sec (e+f x)\right ) \tan (e+f x)}{3 f \left (a^3+a^3 \sec (e+f x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(826\) vs. \(2(164)=328\).
time = 6.33, size = 826, normalized size = 5.04 \begin {gather*} \frac {7 \cos (e+f x) \cot ^6\left (\frac {e}{2}+\frac {f x}{2}\right ) \csc ^2\left (\frac {e}{2}+\frac {f x}{2}\right ) \log \left (\cos \left (\frac {e}{2}+\frac {f x}{2}\right )-\sin \left (\frac {e}{2}+\frac {f x}{2}\right )\right ) (c-c \sec (e+f x))^4}{2 f (a+a \sec (e+f x))^3}-\frac {7 \cos (e+f x) \cot ^6\left (\frac {e}{2}+\frac {f x}{2}\right ) \csc ^2\left (\frac {e}{2}+\frac {f x}{2}\right ) \log \left (\cos \left (\frac {e}{2}+\frac {f x}{2}\right )+\sin \left (\frac {e}{2}+\frac {f x}{2}\right )\right ) (c-c \sec (e+f x))^4}{2 f (a+a \sec (e+f x))^3}+\frac {76 \cos (e+f x) \cot ^5\left (\frac {e}{2}+\frac {f x}{2}\right ) \csc ^3\left (\frac {e}{2}+\frac {f x}{2}\right ) \sec \left (\frac {e}{2}\right ) (c-c \sec (e+f x))^4 \sin \left (\frac {f x}{2}\right )}{15 f (a+a \sec (e+f x))^3}+\frac {8 \cos (e+f x) \cot ^3\left (\frac {e}{2}+\frac {f x}{2}\right ) \csc ^5\left (\frac {e}{2}+\frac {f x}{2}\right ) \sec \left (\frac {e}{2}\right ) (c-c \sec (e+f x))^4 \sin \left (\frac {f x}{2}\right )}{15 f (a+a \sec (e+f x))^3}+\frac {2 \cos (e+f x) \cot \left (\frac {e}{2}+\frac {f x}{2}\right ) \csc ^7\left (\frac {e}{2}+\frac {f x}{2}\right ) \sec \left (\frac {e}{2}\right ) (c-c \sec (e+f x))^4 \sin \left (\frac {f x}{2}\right )}{5 f (a+a \sec (e+f x))^3}+\frac {\cos (e+f x) \cot ^6\left (\frac {e}{2}+\frac {f x}{2}\right ) \csc ^2\left (\frac {e}{2}+\frac {f x}{2}\right ) (c-c \sec (e+f x))^4 \sin \left (\frac {f x}{2}\right )}{2 f (a+a \sec (e+f x))^3 \left (\cos \left (\frac {e}{2}\right )-\sin \left (\frac {e}{2}\right )\right ) \left (\cos \left (\frac {e}{2}+\frac {f x}{2}\right )-\sin \left (\frac {e}{2}+\frac {f x}{2}\right )\right )}+\frac {\cos (e+f x) \cot ^6\left (\frac {e}{2}+\frac {f x}{2}\right ) \csc ^2\left (\frac {e}{2}+\frac {f x}{2}\right ) (c-c \sec (e+f x))^4 \sin \left (\frac {f x}{2}\right )}{2 f (a+a \sec (e+f x))^3 \left (\cos \left (\frac {e}{2}\right )+\sin \left (\frac {e}{2}\right )\right ) \left (\cos \left (\frac {e}{2}+\frac {f x}{2}\right )+\sin \left (\frac {e}{2}+\frac {f x}{2}\right )\right )}+\frac {8 \cos (e+f x) \cot ^4\left (\frac {e}{2}+\frac {f x}{2}\right ) \csc ^4\left (\frac {e}{2}+\frac {f x}{2}\right ) (c-c \sec (e+f x))^4 \tan \left (\frac {e}{2}\right )}{15 f (a+a \sec (e+f x))^3}+\frac {2 \cos (e+f x) \cot ^2\left (\frac {e}{2}+\frac {f x}{2}\right ) \csc ^6\left (\frac {e}{2}+\frac {f x}{2}\right ) (c-c \sec (e+f x))^4 \tan \left (\frac {e}{2}\right )}{5 f (a+a \sec (e+f x))^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.20, size = 108, normalized size = 0.66
method | result | size |
derivativedivides | \(\frac {4 c^{4} \left (\frac {\left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{5}+\frac {2 \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{3}+3 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )-\frac {1}{4 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}+\frac {7 \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{4}-\frac {1}{4 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}-\frac {7 \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{4}\right )}{f \,a^{3}}\) | \(108\) |
default | \(\frac {4 c^{4} \left (\frac {\left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{5}+\frac {2 \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{3}+3 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )-\frac {1}{4 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}+\frac {7 \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{4}-\frac {1}{4 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}-\frac {7 \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{4}\right )}{f \,a^{3}}\) | \(108\) |
risch | \(\frac {2 i c^{4} \left (120 \,{\mathrm e}^{6 i \left (f x +e \right )}+495 \,{\mathrm e}^{5 i \left (f x +e \right )}+1235 \,{\mathrm e}^{4 i \left (f x +e \right )}+1270 \,{\mathrm e}^{3 i \left (f x +e \right )}+1342 \,{\mathrm e}^{2 i \left (f x +e \right )}+715 \,{\mathrm e}^{i \left (f x +e \right )}+167\right )}{15 f \,a^{3} \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right ) \left ({\mathrm e}^{i \left (f x +e \right )}+1\right )^{5}}+\frac {7 c^{4} \ln \left ({\mathrm e}^{i \left (f x +e \right )}-i\right )}{a^{3} f}-\frac {7 c^{4} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}{a^{3} f}\) | \(156\) |
norman | \(\frac {\frac {14 c^{4} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{a f}-\frac {154 c^{4} \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{3 a f}+\frac {1022 c^{4} \left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{15 a f}-\frac {186 c^{4} \left (\tan ^{7}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{5 a f}+\frac {92 c^{4} \left (\tan ^{9}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{15 a f}-\frac {8 c^{4} \left (\tan ^{11}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{15 a f}+\frac {4 c^{4} \left (\tan ^{13}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{5 a f}}{\left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )^{4} a^{2}}+\frac {7 c^{4} \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{a^{3} f}-\frac {7 c^{4} \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{a^{3} f}\) | \(220\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 510 vs.
\(2 (172) = 344\).
time = 0.29, size = 510, normalized size = 3.11 \begin {gather*} \frac {3 \, c^{4} {\left (\frac {40 \, \sin \left (f x + e\right )}{{\left (a^{3} - \frac {a^{3} \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (f x + e\right ) + 1\right )}} + \frac {\frac {85 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {10 \, \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} + \frac {\sin \left (f x + e\right )^{5}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{5}}}{a^{3}} - \frac {60 \, \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right )}{a^{3}} + \frac {60 \, \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - 1\right )}{a^{3}}\right )} + 4 \, c^{4} {\left (\frac {\frac {105 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {20 \, \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} + \frac {3 \, \sin \left (f x + e\right )^{5}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{5}}}{a^{3}} - \frac {60 \, \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right )}{a^{3}} + \frac {60 \, \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - 1\right )}{a^{3}}\right )} + \frac {6 \, c^{4} {\left (\frac {15 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {10 \, \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} + \frac {3 \, \sin \left (f x + e\right )^{5}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{5}}\right )}}{a^{3}} + \frac {c^{4} {\left (\frac {15 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - \frac {10 \, \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} + \frac {3 \, \sin \left (f x + e\right )^{5}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{5}}\right )}}{a^{3}} - \frac {12 \, c^{4} {\left (\frac {5 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - \frac {\sin \left (f x + e\right )^{5}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{5}}\right )}}{a^{3}}}{60 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.39, size = 249, normalized size = 1.52 \begin {gather*} -\frac {105 \, {\left (c^{4} \cos \left (f x + e\right )^{4} + 3 \, c^{4} \cos \left (f x + e\right )^{3} + 3 \, c^{4} \cos \left (f x + e\right )^{2} + c^{4} \cos \left (f x + e\right )\right )} \log \left (\sin \left (f x + e\right ) + 1\right ) - 105 \, {\left (c^{4} \cos \left (f x + e\right )^{4} + 3 \, c^{4} \cos \left (f x + e\right )^{3} + 3 \, c^{4} \cos \left (f x + e\right )^{2} + c^{4} \cos \left (f x + e\right )\right )} \log \left (-\sin \left (f x + e\right ) + 1\right ) - 2 \, {\left (167 \, c^{4} \cos \left (f x + e\right )^{3} + 381 \, c^{4} \cos \left (f x + e\right )^{2} + 277 \, c^{4} \cos \left (f x + e\right ) + 15 \, c^{4}\right )} \sin \left (f x + e\right )}{30 \, {\left (a^{3} f \cos \left (f x + e\right )^{4} + 3 \, a^{3} f \cos \left (f x + e\right )^{3} + 3 \, a^{3} f \cos \left (f x + e\right )^{2} + a^{3} f \cos \left (f x + e\right )\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {c^{4} \left (\int \frac {\sec {\left (e + f x \right )}}{\sec ^{3}{\left (e + f x \right )} + 3 \sec ^{2}{\left (e + f x \right )} + 3 \sec {\left (e + f x \right )} + 1}\, dx + \int \left (- \frac {4 \sec ^{2}{\left (e + f x \right )}}{\sec ^{3}{\left (e + f x \right )} + 3 \sec ^{2}{\left (e + f x \right )} + 3 \sec {\left (e + f x \right )} + 1}\right )\, dx + \int \frac {6 \sec ^{3}{\left (e + f x \right )}}{\sec ^{3}{\left (e + f x \right )} + 3 \sec ^{2}{\left (e + f x \right )} + 3 \sec {\left (e + f x \right )} + 1}\, dx + \int \left (- \frac {4 \sec ^{4}{\left (e + f x \right )}}{\sec ^{3}{\left (e + f x \right )} + 3 \sec ^{2}{\left (e + f x \right )} + 3 \sec {\left (e + f x \right )} + 1}\right )\, dx + \int \frac {\sec ^{5}{\left (e + f x \right )}}{\sec ^{3}{\left (e + f x \right )} + 3 \sec ^{2}{\left (e + f x \right )} + 3 \sec {\left (e + f x \right )} + 1}\, dx\right )}{a^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.61, size = 141, normalized size = 0.86 \begin {gather*} -\frac {\frac {105 \, c^{4} \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1 \right |}\right )}{a^{3}} - \frac {105 \, c^{4} \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1 \right |}\right )}{a^{3}} + \frac {30 \, c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{{\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 1\right )} a^{3}} - \frac {4 \, {\left (3 \, a^{12} c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} + 10 \, a^{12} c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 45 \, a^{12} c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}}{a^{15}}}{15 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.63, size = 126, normalized size = 0.77 \begin {gather*} \frac {12\,c^4\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{a^3\,f}+\frac {8\,c^4\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3}{3\,a^3\,f}+\frac {4\,c^4\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5}{5\,a^3\,f}-\frac {14\,c^4\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )}{a^3\,f}-\frac {2\,c^4\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{f\,\left (a^3\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2-a^3\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________